Close
dtSearch Engine API for Java
DataSource2.setDocBytes Method
Syntax
Java
public void setDocBytes(byte[] data);

Use setDocBytes to provide an array of bytes for dtSearch to use as the binary contents of this document. To tell dtSearch to check for an array of bytes, the data source must return true from haveDocBytes().  

The calling program should call setDocBytes to provide the binary contents of a file to be indexed before returning from getNextDoc().  

While getDocText() can only return a stream of plain text, setDocBytes can return any type of binary data, such as the contents of a Word document or a PDF file.